#include "../include/server.h"

int funcjudge(const char* buf)
{
    char buf1[1024];
    char buf2[1024];
    sscanf(buf,"%s %s",buf1,buf2);
    if(strcmp(buf1,"cd")==0) return CMD_TYPE_CD;
    if(strcmp(buf1,"ls")==0) return CMD_TYPE_LS;
    if(strcmp(buf1,"ll")==0) return CMD_TYPE_LL;
    if(strcmp(buf1,"pwd")==0) return CMD_TYPE_PWD;
    if(strcmp(buf1,"getsfile")==0) return CMD_TYPE_GETS;
    if(strcmp(buf1,"putsfile")==0) return CMD_TYPE_PUTS;
    if(strcmp(buf1,"mv")==0) return CMD_TYPE_MV;
    if(strcmp(buf1,"cp")==0) return CMD_TYPE_CP;
    if(strcmp(buf1,"rm")==0) return CMD_TYPE_RM;
    if(strcmp(buf1,"mkdir")==0) return CMD_TYPE_MKDIR;
    else return -1;
}

